package com.buli.blmall.admin.common.controller;

import com.buli.blmall.admin.base.BaseController;
import com.buli.blmall.admin.common.request.SmsSend;
import com.buli.blmall.admin.common.response.Result;
import com.buli.blmall.admin.common.service.SmsService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiang.gao
 * @date 2025/2/20 17:47
 */
@RestController
@RequestMapping("/sms")
@AllArgsConstructor
public class SmsController extends BaseController {

    private final SmsService smsService;

    @PostMapping("/send")
    public Object send(@Validated @RequestBody SmsSend smsSend) {
        smsService.sendCaptcha(smsSend);
        return Result.success();
    }


}
